home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
TURB_VIS
/
PGC122
/
BBVALIDA.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-02-09
|
5KB
|
44 lines
(* This file was mangled by Mangler 1.14 (c) Copyright 1993 by Berend de Boer *)
{$IFDEF DPMI} {$X+,S-} {$ELSE} {$X+,F+,O+} {$ENDIF} UNIT BBVALIDATE ;INTERFACE USES OBJECTS , VALIDATE ;
TYPE PFILTERVALIDATOR =^TFILTERVALIDATOR ;TFILTERVALIDATOR =OBJECT (VALIDATE.TFILTERVALIDATOR)RESSTRID :WORD ;
CONSTRUCTOR INIT (AVALIDCHARS :TCHARSET );CONSTRUCTOR LOAD (VAR S :TSTREAM );PROCEDURE ERROR ;VIRTUAL;PROCEDURE STORE
(VAR S :TSTREAM );END ;PRANGEVALIDATOR =^TRANGEVALIDATOR ;
TRANGEVALIDATOR =OBJECT (VALIDATE.TRANGEVALIDATOR)RESSTRID :WORD ;CONSTRUCTOR INIT (AMIN ,AMAX:LONGINT );
CONSTRUCTOR LOAD (VAR S :TSTREAM );PROCEDURE ERROR ;VIRTUAL;PROCEDURE STORE (VAR S :TSTREAM );END ;
PPXPICTUREVALIDATOR =^TPXPICTUREVALIDATOR ;TPXPICTUREVALIDATOR =OBJECT (VALIDATE.TPXPICTUREVALIDATOR)RESSTRID :WORD ;
CONSTRUCTOR INIT (CONST APIC :STRING ;AUTOFILL :BOOLEAN );CONSTRUCTOR LOAD (VAR S :TSTREAM );PROCEDURE ERROR ;VIRTUAL;
PROCEDURE STORE (VAR S :TSTREAM );END ;PREALVALIDATOR =^TREALVALIDATOR ;
TREALVALIDATOR =OBJECT (TPXPICTUREVALIDATOR)MIN , MAX :REAL ;CONSTRUCTOR INIT (AMIN ,AMAX:REAL );CONSTRUCTOR LOAD
(VAR S :TSTREAM );PROCEDURE ERROR ;VIRTUAL;FUNCTION ISVALID (CONST S :STRING ):BOOLEAN ;VIRTUAL;PROCEDURE STORE
(VAR S :TSTREAM );FUNCTION TRANSFER (VAR S :STRING ;BUFFER :POINTER ;FLAG :TVTRANSFER ):WORD ;VIRTUAL;END ;
PROCEDURE REGISTERVALIDATE ;CONST RFILTERVALIDATOR :TSTREAMREC =(OBJTYPE :81 ;
VMTLINK :OFS (TYPEOF (TFILTERVALIDATOR )^);LOAD :@ TFILTERVALIDATOR . LOAD ;STORE :@ TFILTERVALIDATOR . STORE );
CONST RRANGEVALIDATOR :TSTREAMREC =(OBJTYPE :82 ;VMTLINK :OFS (TYPEOF (TRANGEVALIDATOR )^);LOAD :@ TRANGEVALIDATOR .
LOAD ;STORE :@ TRANGEVALIDATOR . STORE );IMPLEMENTATION USES BBSTRRES , BBGUI , BBUTIL ;{$I PREAPP.INC}
CONSTRUCTOR TFILTERVALIDATOR.INIT (AVALIDCHARS:TCHARSET);BEGIN INHERITED INIT(AVALIDCHARS );RESSTRID := SFILTERERROR ;
END ;CONSTRUCTOR TFILTERVALIDATOR.LOAD (VAR S:TSTREAM);BEGIN INHERITED LOAD(S );S.READ (RESSTRID , SIZEOF (RESSTRID ));
END ;PROCEDURE TFILTERVALIDATOR.ERROR ;BEGIN PRINTERROR (RSGET (RESSTRID ), 0 );END ;PROCEDURE TFILTERVALIDATOR.STORE
(VAR S:TSTREAM);BEGIN INHERITED STORE(S );S.WRITE (RESSTRID , SIZEOF (RESSTRID ));END ;CONSTRUCTOR TRANGEVALIDATOR.INIT
(AMIN,AMAX:LONGINT);BEGIN INHERITED INIT(AMIN , AMAX );RESSTRID := SRANGEERROR ;END ;CONSTRUCTOR TRANGEVALIDATOR.LOAD
(VAR S:TSTREAM);BEGIN INHERITED LOAD(S );S.READ (RESSTRID , SIZEOF (RESSTRID ));END ;PROCEDURE TRANGEVALIDATOR.ERROR ;
BEGIN PRINTERROR (RSGET2 (SRANGEERROR , MIN , MAX ), 0 );END ;PROCEDURE TRANGEVALIDATOR.STORE (VAR S:TSTREAM);
BEGIN INHERITED STORE(S );S.WRITE (RESSTRID , SIZEOF (RESSTRID ));END ;CONSTRUCTOR TPXPICTUREVALIDATOR.INIT
(CONST APIC:STRING ;AUTOFILL:BOOLEAN);BEGIN INHERITED INIT(APIC , AUTOFILL );RESSTRID := SPICTUREERROR ;END ;
CONSTRUCTOR TPXPICTUREVALIDATOR.LOAD (VAR S:TSTREAM);BEGIN INHERITED LOAD(S );S.READ (RESSTRID , SIZEOF (RESSTRID ));
END ;PROCEDURE TPXPICTUREVALIDATOR.ERROR ;BEGIN PRINTERROR (RSGET1 (RESSTRID , LONGINT (PIC )), 0 );END ;
PROCEDURE TPXPICTUREVALIDATOR.STORE (VAR S:TSTREAM);BEGIN INHERITED STORE(S );S.WRITE (RESSTRID , SIZEOF (RESSTRID ));
END ;CONSTRUCTOR TREALVALIDATOR.INIT (AMIN,AMAX:REAL);BEGIN INHERITED INIT('[-]#[*#][[.]#[*#]][E[-]#[#]]', FALSE );
OPTIONS := OPTIONS AND NOT VOONAPPEND ;MIN := AMIN ;MAX := AMAX ;RESSTRID := SREALERROR ;END ;
CONSTRUCTOR TREALVALIDATOR.LOAD (VAR S:TSTREAM);BEGIN INHERITED LOAD(S );S.READ (RESSTRID , SIZEOF (RESSTRID ));S.READ
(MIN , SIZEOF (MAX )+ SIZEOF (MIN ));END ;PROCEDURE TREALVALIDATOR.ERROR ;VAR Ol0100I,Ol0O01O:STRING ;BEGIN Ol0100I :=
STRIPSPC (STRR (MIN , 7 , 2 ));Ol0O01O := STRIPSPC (STRR (MAX , 7 , 2 ));PRINTERROR (RSGET2 (RESSTRID , LONGINT (@
Ol0100I ), LONGINT (@ Ol0O01O )), 0 );END ;FUNCTION TREALVALIDATOR.ISVALID (CONST S:STRING ):BOOLEAN ;
VAR OI1IO1O100Ol:REAL;OI0ll01lOOOl:INTEGER;BEGIN ISVALID := FALSE ;IF INHERITED ISVALID(S )THEN BEGIN VAL (S ,
OI1IO1O100Ol , OI0ll01lOOOl );IF (OI0ll01lOOOl =0 )AND (OI1IO1O100Ol >= MIN )AND (OI1IO1O100Ol <= MAX )THEN ISVALID :=
TRUE ;END ;END ;PROCEDURE TREALVALIDATOR.STORE (VAR S:TSTREAM);BEGIN INHERITED STORE(S );S.WRITE (RESSTRID , SIZEOF
(RESSTRID ));S.WRITE (MIN , SIZEOF (MAX )+ SIZEOF (MIN ));END ;FUNCTION TREALVALIDATOR.TRANSFER (VAR S:STRING ;
BUFFER:POINTER;FLAG:TVTRANSFER):WORD ;VAR OI1IO1O100Ol:REAL;OI0ll01lOOOl:INTEGER;BEGIN IF OPTIONS AND VOTRANSFER <> 0
THEN BEGIN TRANSFER := SIZEOF (OI1IO1O100Ol );CASE FLAG OF VTGETDATA :BEGIN VAL (S , OI1IO1O100Ol , OI0ll01lOOOl );REAL
(BUFFER ^):= OI1IO1O100Ol ;END ;VTSETDATA :STR (REAL (BUFFER ^), S );END ;END ELSE TRANSFER := 0 ;END ;
PROCEDURE REGISTERVALIDATE ;BEGIN REGISTERTYPE (RFILTERVALIDATOR );REGISTERTYPE (RRANGEVALIDATOR );END ;END .